# -*- coding: utf-8 -*-
# @Time : 2021/9/13 14:40
# @Author : 阿怪
# @Email : 673691277@qq.com
# @File : base_case.py
# @Project : crm自动化测试项目实战
'''用例基类'''
import unittest
from time import sleep
from driver.driver import chrome
from selenium.webdriver.common.by import By
from utils.util import HS2
from utils.util import HOST2
from utils.get_cookie import cookie


class BaseCase(unittest.TestCase):
    '''用例基类'''
    @classmethod
    def setUpClass(cls):
        cls.cookie = cookie(HOST2,'admin','admin123')
        # self.driver.find_element(By.NAME, 'name').send_keys('admin')
        # self.driver.find_element(By.NAME, 'password').send_keys('admin123')
        # self.driver.find_element(By.NAME, 'submit').click()

    def setUp(self):
        ''' '''
        self.driver = chrome()
        self.driver.get(HS2)
        self.driver.add_cookie(self.cookie)





    def tearDown(self):
        '''每条用例执行完成退出'''
        sleep(2)
        self.driver.quit()